<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class ClassBaseTime extends Model
{
    protected $table = 'class_base_time';

    public $timestamps = FALSE;

    /**
     * 时间获取器
     */
    public function getWeekAttribute($value)
    {
        switch ($value){
            case '1':
                $value = '星期一';
                break;
            case '2':
                $value = '星期二';
                break;
            case '3':
                $value = '星期三';
                break;
            case '4':
                $value = '星期四';
                break;
            case '5':
                $value = '星期五';
                break;
            case '6':
                $value = '星期六';
                break;
            case '7':
                $value = '星期日';
                break;
        }
        return $value;
    }
}
